package com.justech.eat.global.model;

/**
 * @program: eat-service
 * @description:
 * @author: feifei.li
 * @create: 2020-05-29 15:16
 **/
public class Result<T> {
    private int code;

    private String message;

    private boolean isError;

    private T data;

    public Result(int code, String message, boolean isError, T data) {
        this.code = code;
        this.message = message;
        this.isError = isError;
        this.data = data;
    }

    public Result(int code, boolean isError) {
        this.code = code;
        this.isError = isError;
    }

    public Result(int code, String message, boolean isError) {
        this.code = code;
        this.message = message;
        this.isError = isError;
    }

    public Result(int code, boolean isError, T data) {
        this.code = code;
        this.isError = isError;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isError() {
        return isError;
    }

    public void setError(boolean error) {
        isError = error;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
